<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>

  </style>
</head>

<body>
  <div id="app">
    <div v-for="(cate,index) in floor">
      <h3>{{cate.title}}</h3>
      <ul>
        <li v-for="(item,index2) in cate.items">
          <h5>商品名：{{item.name}}</h5>
          <p>商品价格：{{item.price}}</p>
        
          <p>这是  这是第{{index+1}}楼的第{{index2+1}}个商品</p>
        </li>
      </ul>
    </div>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      data: {
        floor: [
          {
            title: "手机",
            items: [
              {
                name: '商品1',
                price: 10
              },
              {
                name: '商品2',
                price: 20
              },
              {
                name: '商品3',
                price: 30
              },
              {
                name: '商品4',
                price: 10
              }
            ]
          },
          {
            title: "家电",
            items: [
              {
                name: '商品1',
                price: 10
              },
              {
                name: '商品2',
                price: 20
              },
              {
                name: '商品3',
                price: 30
              },
              {
                name: '商品4',
                price: 10
              }
            ]
          },
          {
            title: "手表",
            items: [
              {
                name: '商品1',
                price: 10
              },
              {
                name: '商品2',
                price: 20
              },
              {
                name: '商品3',
                price: 30
              },
              {
                name: '商品4',
                price: 10
              }
            ]
          }
        ]
      }
    })
    vm.$mount('#app');
  </script>
</body>

</html>